package cn.isjinhao.se.sql.evaluation.object;

import cn.isjinhao.se.sql.evaluation.EvaluationException;

/**
 *
 * 封装一个参数，对应着一个IDENTIFIER
 *
 * @Author ISJINHAO
 * @Date 2021/4/17 9:47
 */
public class ParameterWrapper extends Wrapper<Object> {

    public ParameterWrapper(Object o, Class<?> clazz, String name) {
        super(o, clazz, name);
    }

    @Override
    protected void assertValue() {
        if(obj == null || clazz == null || obj.getClass() != clazz) {
            throw new EvaluationException("参数的值和类型不能为空，且需要一致");
        }
    }

}
